import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
// import reportWebVitals from './reportWebVitals';

//history BrowserRouter 配置和路由 HashRouter 哈希模式
import {BrowserRouter} from 'react-router-dom'

ReactDOM.render(
  // React.StrictMode 为严格模式   React.Fragment 普通模式
  <React.Fragment>
    <BrowserRouter>
      <App />
    </BrowserRouter>
  </React.Fragment>,
  document.getElementById('root')
);

// 监测redux中状态的变化，只要变化就调用render ----解决redux数据跟新页面不跟新问题  
// import store from './store/index'
// store.subscribe(() => {
//   ReactDOM.render(
//     <React.StrictMode>
//       <BrowserRouter>
//         <App />
//       </BrowserRouter>
//     </React.StrictMode>,
//     document.getElementById('root')
//   );
// });


// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
// reportWebVitals();
